package com.bwie.controller;

import com.bwie.service.CategoryService;
import com.bwie.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: Mikey
 * @Date: 2025/9/9 13:17
 * @Description:
 **/
@RestController
@RequestMapping("shop/index")
public class CategoryController {
    @Autowired
    private CategoryService categoryService;


    /***
     * @author: 秋晚
     * @description:获取所有的分类
     * @params: []
     * @return: com.bwie.utils.R
     * @date: 2025/9/9 13:18
     */
    @GetMapping("getCategoryList")
    public R getCategoryList(){
        return R.OK(categoryService.list());
    }
}
